﻿using BattleFury.Server.Wpf.Core.ViewModels;
using System;
using System.Windows;

namespace BattleFury.Server.Wpf.Core.Views
{
	public abstract class View<T>
		: FrameworkElement, IView<T>
		where T : IViewModel
	{
		public T ViewModel { get; set; }

		protected View()
		{
			ViewModel = (T)Activator.CreateInstance(typeof(T));
			DataContext = ViewModel;
		}
	}
}